<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<title></title>
<%@ include file="/WEB-INF/component/commonCSS.jsp"%>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
<div class="box box-primary" id="more" style="width:110px;height:35px;background-color:#222c32;position:absolute;z-index:9999;left:850px;top:100px;display:none;font-size:12px;border-top-color:#222c32;">
            <div class="box-body home-message" id="moreOp" >
            </div>
        </div>
    <section class="content-header">
        <h1><spring:message code="message.lable.compprofileSTDlog"/></h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i><spring:message code="message.lable.first"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.StdManage"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.compprofileStd"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.profileSeeStd"/></a></li>
        </ol>
    </section>
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <div class=" form-inline">
                    <div class="form-group form-group-xs">
                        <label><spring:message code="message.listForm.xiuGaiRiQi"/><spring:message code="message.yanZheng.maoHao"/></label>
                            <div class="input-group">
                                  <input class=" form-control"  name="profileStarttime" id="profileStarttime" type="text" maxlength="128" readonly="readonly" placeholder="yyyy-MM-dd"
                                  onFocus="var endDate=$dp.$('profileEndtime');WdatePicker({maxDate:'#F{$dp.$D(\'profileEndtime\')}'})" />
                            </div>
                        <label>-</label>
                            <div class="input-group">
                                 <input class=" form-control"  name="profileEndtime" id="profileEndtime" type="text" maxlength="128" readonly="readonly" placeholder="yyyy-MM-dd"
                                    onFocus="WdatePicker({minDate:'#F{$dp.$D(\'profileStarttime\')}'})" />
                            </div>
                        </div>
                    <input type="button" id="selectDicCompType" onclick="likeQuery();" class="btn btn-success btn-sm" value="<spring:message code="message.button.seachSpacing"/>">
                </div>
            </div>
        </div>
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
        <div class=" box box-warning bottongroup">
            <label id="allOk" class="btn btn-default btn-sm" onclick='javascript:history.go(-1)'><spring:message code="message.button.getBackSpacing"/></label>
        </div>

    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
        $(function () {
            $("#gridlist").jqGrid({
                url: "${ctx}/stdCompprofile/getStdCompprofileLogDataList.html?compprofileId=${compprofileId}",
                mtype: "POST",
                datatype: "json",
                autowidth: true,
                height: 270,                    
                colNames : ['<spring:message code="message.jqGrid.cz"/>',
                            '<spring:message code="message.listForm.xiuGaiXiangQing"/>',
                            '<spring:message code="message.listForm.xiuGaiRen"/>',
                            '<spring:message code="message.listForm.xiuGaiShiJian"/>' 
                            ],
                colModel : [ 
						 { name: 'operate', index: 'operate',width:10,key:true, align: "center",sortable:false,
						    formatter : function(val, opts, rowdata) {
						    	 return "<a href='toCompProfileLogDetail.html?logId="+rowdata.logId+ "'  style='background:url(${ctx}/lib/img/icon/icon.png) no-repeat -100px 0px' class='opIcon' title='<spring:message code="message.jqGrid.cz.xiangQing"/>'></a>"; 
						     }
						 },
                            { name : 'detail', width : 200, align : "left",sortable:false },
                            { name : 'updUser', width : 30, align : "center",sortable:false },
                            { name : 'updDatetime', width : 35, align : "center",sortable:false }
                          ],
                rowNum: 20,
                rowList: [10, 20, 50,100],
                rownumbers: true,
                pager: "#gridpage",
                viewrecords: true,
                gridComplete:function(){
                    //序号列宽度自适应（参数为jqgridID）
                    autoRNWidth("gridlist");
                    //数据只有一条时默认选中（参数为jqgridID）
                    selectByOneData("gridlist");
                },
                caption: "${profileCode} - ${profileName}&nbsp;<spring:message code='message.jqGrid.cz.weiHuJiLuLieBiao'/>",
                jsonReader: {
                    repeatitems: false,
                    id: "compRegId"
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
        });
        
        function likeQuery(){
            var profileStarttime  = $("#profileStarttime").val();
            var profileEndtime = $("#profileEndtime").val();
            $("#gridlist").jqGrid('setGridParam', {
                mtype:"post",
                postData:{
                    "profileStarttime":profileStarttime,
                    "profileEndtime":profileEndtime
                },
                page: 1 
           }).trigger("reloadGrid");
       }
        
        function showImg(imgPath) {
            var url = "${ctx}/acctInfo/toImg.html";
            $.HN.dialog.open({
                "id" : "showImg",
                "title" : "<spring:message code='message.listForm.XuKeZheng'/>",
                "url" : url,
                "data" : {
                    "imgPath" : imgPath
                },
                "width" : 800,
                "height" : 400,
                "closefunc" : function(params) {
                    if (params) {

                    }
                }
            });
        }
    </script>
</body>
</html>